package com.zhanghu.backendZray.pojo.request.user;

import com.zhanghu.backendZray.valid.ValidPhone;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author ZhangDong
 * @date 2024/8/7 11:11
 */
@Data
public class UserBaseInfoRequest {
    @NotNull(message = "id cannot be null")
    private Integer id;
    @NotEmpty(message = "用户名不能为空")
    @Length(max = 32, min = 1, message = "用户名长度不符合要求1-32")
    private String name;
    @NotEmpty(message = "手机号不能为空")
    @ValidPhone
    private String phone;
    private String password;
}
